package com.liuzh.deviceinfo.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.location.GnssStatus;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.WindowManager;
import b.i.c.a;
import c.h.a.m0.h;
import com.pgl.sys.ces.out.ISdkLite;

public class GpsSkyView extends View {
    public boolean[] A;
    public boolean[] B;
    public boolean[] C;
    public int[] D;
    public int[] E;
    public int F;
    public boolean G = false;
    public boolean H = false;
    public int a;
    public int b;
    public int c;
    public float[] d;
    public int[] e;
    public float[] f;
    public int[] g;
    public Context h;
    public Paint i;
    public Paint j;
    public Paint k;
    public Paint l;
    public Paint m;
    public Paint n;
    public Paint o;
    public Paint p;
    public Paint q;
    public Paint r;
    public Paint s;
    public double t = 0.0d;
    public boolean u;
    public float[] v;
    public float[] w;
    public float[] x;
    public float y = 0.0f;
    public float z = 0.0f;

    public GpsSkyView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.h = context;
        WindowManager windowManager = (WindowManager) context.getSystemService("window");
        this.c = h.t(5.0f, getResources().getDisplayMetrics());
        Paint paint = new Paint();
        this.i = paint;
        paint.setColor(-1);
        this.i.setStyle(Style.FILL);
        this.i.setAntiAlias(true);
        paint = new Paint();
        this.j = paint;
        paint.setColor(-3355444);
        this.j.setStyle(Style.FILL);
        this.j.setAntiAlias(true);
        paint = new Paint();
        this.k = paint;
        paint.setColor(-16777216);
        this.k.setStyle(Style.STROKE);
        this.k.setStrokeWidth(2.0f);
        this.k.setAntiAlias(true);
        paint = new Paint();
        this.l = paint;
        paint.setColor(a.b(this.h, 2131099864));
        this.l.setStyle(Style.STROKE);
        this.l.setAntiAlias(true);
        paint = new Paint();
        this.m = paint;
        paint.setColor(a.b(this.h, 2131099942));
        this.m.setStyle(Style.FILL);
        this.m.setAntiAlias(true);
        paint = new Paint();
        this.n = paint;
        paint.setColor(-16777216);
        this.n.setStyle(Style.STROKE);
        this.n.setStrokeWidth(2.0f);
        this.n.setAntiAlias(true);
        paint = new Paint();
        this.o = paint;
        paint.setColor(-16777216);
        this.o.setStyle(Style.STROKE);
        this.o.setStrokeWidth(8.0f);
        this.o.setAntiAlias(true);
        this.d = new float[]{0.0f, 10.0f, 20.0f, 30.0f};
        this.e = new int[]{a.b(this.h, 2131099864), a.b(this.h, 2131099928), a.b(this.h, 2131099942), a.b(this.h, 2131099858)};
        this.f = new float[]{10.0f, 21.67f, 33.3f, 45.0f};
        this.g = new int[]{a.b(this.h, 2131099864), a.b(this.h, 2131099928), a.b(this.h, 2131099942), a.b(this.h, 2131099858)};
        Paint paint2 = new Paint();
        this.p = paint2;
        paint2.setColor(-16777216);
        this.p.setStyle(Style.STROKE);
        this.p.setStrokeWidth(4.0f);
        this.p.setAntiAlias(true);
        paint2 = new Paint();
        this.q = paint2;
        paint2.setColor(-7829368);
        this.q.setStyle(Style.FILL);
        this.q.setStrokeWidth(4.0f);
        this.q.setAntiAlias(true);
        paint2 = new Paint();
        this.r = paint2;
        paint2.setColor(-16777216);
        this.r.setStyle(Style.STROKE);
        this.r.setTextSize((float) h.t(((float) this.c) * 0.7f, getResources().getDisplayMetrics()));
        this.r.setAntiAlias(true);
        paint2 = new Paint();
        this.s = paint2;
        paint2.setColor(a.b(context, 2131099704));
        this.s.setStyle(Style.FILL);
        this.s.setStrokeWidth(4.0f);
        this.s.setAntiAlias(true);
        setFocusable(true);
    }

    public final void a(Canvas canvas, float f, float f2, float f3, float f4) {
        double toRadians = Math.toRadians(-this.t);
        float cos = (float) Math.cos(toRadians);
        float sin = (float) Math.sin(toRadians);
        float f5 = (f + f3) / 2.0f;
        float f6 = (f2 + f4) / 2.0f;
        float f7 = f - f5;
        float f8 = f6 - f2;
        float f9 = f3 - f5;
        float f10 = f6 - f4;
        float f11 = -sin;
        Canvas canvas2 = canvas;
        canvas2.drawLine(((sin * f8) + (cos * f7)) + f5, (-((f8 * cos) + (f7 * f11))) + f6, ((sin * f10) + (cos * f9)) + f5, (-((cos * f10) + (f11 * f9))) + f6, this.l);
    }

    public final float b(int i, float f) {
        return (1.0f - (f / 90.0f)) * ((float) ((i >> 1) - this.c));
    }

    public void c(double d) {
        this.t = d;
        invalidate();
    }

    /* JADX WARNING: Removed duplicated region for block: B:31:0x011e  */
    /* JADX WARNING: Removed duplicated region for block: B:28:0x0115  */
    public void onDraw(android.graphics.Canvas r23) {
        /*
        r22 = this;
        r7 = r22;
        r0 = r23;
        r1 = r7.b;
        r2 = r7.a;
        r8 = java.lang.Math.min(r1, r2);
        r9 = r8 / 2;
        r10 = (float) r9;
        r1 = r7.u;
        if (r1 == 0) goto L_0x0016;
    L_0x0013:
        r1 = r7.i;
        goto L_0x0018;
    L_0x0016:
        r1 = r7.j;
    L_0x0018:
        r0.drawCircle(r10, r10, r10, r1);
        r3 = 0;
        r1 = 1073741824; // 0x40000000 float:2.0 double:5.304989477E-315;
        r11 = r10 * r1;
        r1 = r22;
        r2 = r23;
        r4 = r10;
        r5 = r11;
        r6 = r10;
        r1.a(r2, r3, r4, r5, r6);
        r4 = 0;
        r3 = r10;
        r5 = r10;
        r6 = r11;
        r1.a(r2, r3, r4, r5, r6);
        r1 = 1114636288; // 0x42700000 float:60.0 double:5.507034975E-315;
        r1 = r7.b(r8, r1);
        r2 = r7.l;
        r0.drawCircle(r10, r10, r1, r2);
        r1 = 1106247680; // 0x41f00000 float:30.0 double:5.465589745E-315;
        r1 = r7.b(r8, r1);
        r2 = r7.l;
        r0.drawCircle(r10, r10, r1, r2);
        r11 = 0;
        r1 = r7.b(r8, r11);
        r2 = r7.l;
        r0.drawCircle(r10, r10, r1, r2);
        r1 = r7.k;
        r0.drawCircle(r10, r10, r10, r1);
        r1 = r8 >> 1;
        r1 = (float) r1;
        r2 = r7.t;
        r2 = -r2;
        java.lang.Math.toRadians(r2);
        r2 = 1119092736; // 0x42b40000 float:90.0 double:5.529052754E-315;
        r2 = r7.b(r8, r2);
        r3 = 1028443341; // 0x3d4ccccd float:0.05 double:5.081185235E-315;
        r3 = r3 * r1;
        r4 = r1 + r3;
        r5 = 1036831949; // 0x3dcccccd float:0.1 double:5.122630465E-315;
        r5 = r5 * r1;
        r5 = r5 + r2;
        r3 = r1 - r3;
        r6 = new android.graphics.Path;
        r6.<init>();
        r10 = android.graphics.Path.FillType.EVEN_ODD;
        r6.setFillType(r10);
        r6.moveTo(r1, r2);
        r6.lineTo(r4, r5);
        r6.lineTo(r3, r5);
        r6.lineTo(r1, r2);
        r6.close();
        r2 = new android.graphics.Matrix;
        r2.<init>();
        r3 = r7.t;
        r3 = -r3;
        r3 = (float) r3;
        r2.postRotate(r3, r1, r1);
        r6.transform(r2);
        r1 = r7.p;
        r0.drawPath(r6, r1);
        r1 = r7.q;
        r0.drawPath(r6, r1);
        r1 = r7.w;
        if (r1 == 0) goto L_0x0358;
    L_0x00aa:
        r10 = r7.F;
        r13 = 0;
    L_0x00ad:
        if (r13 >= r10) goto L_0x0358;
    L_0x00af:
        r1 = r7.w;
        r2 = r1[r13];
        r2 = (r2 > r11 ? 1 : (r2 == r11 ? 0 : -1));
        if (r2 != 0) goto L_0x00cc;
    L_0x00b7:
        r2 = r7.x;
        r2 = r2[r13];
        r2 = (r2 > r11 ? 1 : (r2 == r11 ? 0 : -1));
        if (r2 == 0) goto L_0x00c0;
    L_0x00bf:
        goto L_0x00cc;
    L_0x00c0:
        r15 = r8;
        r20 = r9;
        r17 = r10;
        r21 = r13;
        r16 = 0;
        r10 = r0;
        goto L_0x034a;
    L_0x00cc:
        r1 = r1[r13];
        r2 = r7.x;
        r2 = r2[r13];
        r3 = r7.v;
        r3 = r3[r13];
        r4 = r7.D;
        r14 = r4[r13];
        r4 = r7.E;
        r4 = r4[r13];
        r5 = r7.C;
        r5 = r5[r13];
        r6 = (r3 > r11 ? 1 : (r3 == r11 ? 0 : -1));
        if (r6 != 0) goto L_0x00f1;
    L_0x00e6:
        r3 = r7.s;
        r6 = r3;
        r17 = r10;
        r21 = r13;
        r16 = 0;
        goto L_0x0196;
    L_0x00f1:
        r6 = r7.m;
        r15 = new android.graphics.Paint;
        r15.<init>(r6);
        monitor-enter(r22);
        r6 = r7.G;	 Catch:{ all -> 0x0355 }
        if (r6 == 0) goto L_0x0108;
    L_0x00fd:
        r6 = r7.H;	 Catch:{ all -> 0x0355 }
        if (r6 == 0) goto L_0x0102;
    L_0x0101:
        goto L_0x0108;
    L_0x0102:
        r6 = r7.d;	 Catch:{ all -> 0x0355 }
        r11 = r6.length;	 Catch:{ all -> 0x0355 }
        r12 = r7.e;	 Catch:{ all -> 0x0355 }
        goto L_0x010d;
    L_0x0108:
        r6 = r7.f;	 Catch:{ all -> 0x0355 }
        r11 = r6.length;	 Catch:{ all -> 0x0355 }
        r12 = r7.g;	 Catch:{ all -> 0x0355 }
    L_0x010d:
        r16 = 0;
        r17 = r6[r16];	 Catch:{ all -> 0x0355 }
        r17 = (r3 > r17 ? 1 : (r3 == r17 ? 0 : -1));
        if (r17 > 0) goto L_0x011e;
    L_0x0115:
        r3 = r12[r16];	 Catch:{ all -> 0x0355 }
        monitor-exit(r22);
    L_0x0118:
        r17 = r10;
        r21 = r13;
        goto L_0x0192;
    L_0x011e:
        r11 = r11 + -1;
        r17 = r6[r11];	 Catch:{ all -> 0x0355 }
        r17 = (r3 > r17 ? 1 : (r3 == r17 ? 0 : -1));
        if (r17 < 0) goto L_0x012a;
    L_0x0126:
        r3 = r12[r11];	 Catch:{ all -> 0x0355 }
        monitor-exit(r22);
        goto L_0x0118;
    L_0x012a:
        r17 = r10;
        r10 = 0;
    L_0x012d:
        if (r10 >= r11) goto L_0x018c;
    L_0x012f:
        r18 = r6[r10];	 Catch:{ all -> 0x0355 }
        r19 = r10 + 1;
        r20 = r6[r19];	 Catch:{ all -> 0x0355 }
        r21 = (r3 > r18 ? 1 : (r3 == r18 ? 0 : -1));
        if (r21 < 0) goto L_0x0183;
    L_0x0139:
        r21 = (r3 > r20 ? 1 : (r3 == r20 ? 0 : -1));
        if (r21 > 0) goto L_0x0183;
    L_0x013d:
        r6 = r12[r10];	 Catch:{ all -> 0x0355 }
        r10 = android.graphics.Color.red(r6);	 Catch:{ all -> 0x0355 }
        r11 = android.graphics.Color.green(r6);	 Catch:{ all -> 0x0355 }
        r6 = android.graphics.Color.blue(r6);	 Catch:{ all -> 0x0355 }
        r12 = r12[r19];	 Catch:{ all -> 0x0355 }
        r21 = r13;
        r13 = android.graphics.Color.red(r12);	 Catch:{ all -> 0x0355 }
        r0 = android.graphics.Color.green(r12);	 Catch:{ all -> 0x0355 }
        r12 = android.graphics.Color.blue(r12);	 Catch:{ all -> 0x0355 }
        r3 = r3 - r18;
        r20 = r20 - r18;
        r3 = r3 / r20;
        r13 = (float) r13;	 Catch:{ all -> 0x0355 }
        r13 = r13 * r3;
        r10 = (float) r10;	 Catch:{ all -> 0x0355 }
        r18 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;
        r18 = r18 - r3;
        r10 = r10 * r18;
        r10 = r10 + r13;
        r10 = (int) r10;	 Catch:{ all -> 0x0355 }
        r0 = (float) r0;	 Catch:{ all -> 0x0355 }
        r0 = r0 * r3;
        r11 = (float) r11;	 Catch:{ all -> 0x0355 }
        r11 = r11 * r18;
        r11 = r11 + r0;
        r0 = (int) r11;	 Catch:{ all -> 0x0355 }
        r11 = (float) r12;	 Catch:{ all -> 0x0355 }
        r11 = r11 * r3;
        r3 = (float) r6;	 Catch:{ all -> 0x0355 }
        r3 = r3 * r18;
        r3 = r3 + r11;
        r3 = (int) r3;	 Catch:{ all -> 0x0355 }
        r3 = android.graphics.Color.rgb(r10, r0, r3);	 Catch:{ all -> 0x0355 }
        monitor-exit(r22);
        goto L_0x0192;
    L_0x0183:
        r21 = r13;
        r0 = r23;
        r10 = r19;
        r13 = r21;
        goto L_0x012d;
    L_0x018c:
        r21 = r13;
        r3 = -65281; // 0xffffffffffff00ff float:NaN double:NaN;
        monitor-exit(r22);
    L_0x0192:
        r15.setColor(r3);
        r6 = r15;
    L_0x0196:
        if (r5 == 0) goto L_0x019b;
    L_0x0198:
        r0 = r7.o;
        goto L_0x019d;
    L_0x019b:
        r0 = r7.n;
    L_0x019d:
        r1 = r7.b(r8, r1);
        r10 = (double) r1;
        r1 = (double) r2;
        r12 = r7.t;
        r1 = r1 - r12;
        r1 = (float) r1;
        r1 = (double) r1;
        r1 = java.lang.Math.toRadians(r1);
        r1 = (float) r1;
        r1 = (double) r1;
        r12 = (double) r9;
        r18 = java.lang.Math.sin(r1);
        r18 = r18 * r10;
        r15 = r8;
        r20 = r9;
        r8 = r18 + r12;
        r8 = (float) r8;
        r1 = java.lang.Math.cos(r1);
        r1 = r1 * r10;
        r12 = r12 - r1;
        r9 = (float) r12;
        r1 = c.h.a.m0.h.d;
        if (r1 == 0) goto L_0x01cc;
    L_0x01c7:
        r1 = c.f.a.a.a.a.j(r4);
        goto L_0x01d0;
    L_0x01cc:
        r1 = c.f.a.a.a.a.r(r14);
    L_0x01d0:
        r2 = 1069547520; // 0x3fc00000 float:1.5 double:5.28426686E-315;
        switch(r1) {
            case 0: goto L_0x031c;
            case 1: goto L_0x02f8;
            case 2: goto L_0x02ab;
            case 3: goto L_0x0254;
            case 4: goto L_0x0227;
            case 5: goto L_0x020d;
            case 6: goto L_0x01d9;
            default: goto L_0x01d5;
        };
    L_0x01d5:
        r10 = r23;
        goto L_0x032a;
    L_0x01d9:
        r1 = new android.graphics.Path;
        r1.<init>();
        r3 = r7.c;
        r3 = (float) r3;
        r3 = r9 - r3;
        r1.moveTo(r8, r3);
        r3 = r7.c;
        r3 = (float) r3;
        r3 = r3 * r2;
        r3 = r8 - r3;
        r1.lineTo(r3, r9);
        r3 = r7.c;
        r3 = (float) r3;
        r3 = r3 + r9;
        r1.lineTo(r8, r3);
        r3 = r7.c;
        r3 = (float) r3;
        r3 = r3 * r2;
        r3 = r3 + r8;
        r1.lineTo(r3, r9);
        r1.close();
        r10 = r23;
        r10.drawPath(r1, r6);
        r10.drawPath(r1, r0);
        goto L_0x032a;
    L_0x020d:
        r10 = r23;
        r1 = new android.graphics.RectF;
        r3 = r7.c;
        r3 = (float) r3;
        r2 = r2 * r3;
        r4 = r8 - r2;
        r5 = r9 - r3;
        r2 = r2 + r8;
        r3 = r3 + r9;
        r1.<init>(r4, r5, r2, r3);
        r10.drawOval(r1, r6);
        r10.drawOval(r1, r0);
        goto L_0x032a;
    L_0x0227:
        r10 = r23;
        r1 = r7.c;
        r1 = (float) r1;
        r2 = r9 - r1;
        r3 = r8 - r1;
        r4 = r1 + r9;
        r1 = r1 + r8;
        r5 = new android.graphics.Path;
        r5.<init>();
        r11 = android.graphics.Path.FillType.EVEN_ODD;
        r5.setFillType(r11);
        r5.moveTo(r8, r2);
        r5.lineTo(r3, r4);
        r5.lineTo(r1, r4);
        r5.lineTo(r8, r2);
        r5.close();
        r10.drawPath(r5, r6);
        r10.drawPath(r5, r0);
        goto L_0x032a;
    L_0x0254:
        r10 = r23;
        r1 = new android.graphics.Path;
        r1.<init>();
        r2 = r7.c;
        r2 = (float) r2;
        r3 = 1058642330; // 0x3f19999a float:0.6 double:5.230388065E-315;
        r4 = r2 * r3;
        r4 = r8 - r4;
        r2 = r9 - r2;
        r1.moveTo(r4, r2);
        r2 = r7.c;
        r2 = (float) r2;
        r4 = 1068708659; // 0x3fb33333 float:1.4 double:5.28012234E-315;
        r2 = r2 * r4;
        r2 = r8 - r2;
        r1.lineTo(r2, r9);
        r2 = r7.c;
        r2 = (float) r2;
        r5 = r2 * r3;
        r5 = r8 - r5;
        r2 = r2 + r9;
        r1.lineTo(r5, r2);
        r2 = r7.c;
        r2 = (float) r2;
        r5 = r2 * r3;
        r5 = r5 + r8;
        r2 = r2 + r9;
        r1.lineTo(r5, r2);
        r2 = r7.c;
        r2 = (float) r2;
        r2 = r2 * r4;
        r2 = r2 + r8;
        r1.lineTo(r2, r9);
        r2 = r7.c;
        r2 = (float) r2;
        r3 = r3 * r2;
        r3 = r3 + r8;
        r2 = r9 - r2;
        r1.lineTo(r3, r2);
        r1.close();
        r10.drawPath(r1, r6);
        r10.drawPath(r1, r0);
        goto L_0x032a;
    L_0x02ab:
        r10 = r23;
        r1 = new android.graphics.Path;
        r1.<init>();
        r2 = r7.c;
        r2 = (float) r2;
        r2 = r9 - r2;
        r1.moveTo(r8, r2);
        r2 = r7.c;
        r3 = (float) r2;
        r3 = r8 - r3;
        r2 = r2 / 3;
        r2 = (float) r2;
        r2 = r9 - r2;
        r1.lineTo(r3, r2);
        r2 = r7.c;
        r3 = r2 / 3;
        r3 = r3 * 2;
        r3 = (float) r3;
        r3 = r8 - r3;
        r2 = (float) r2;
        r2 = r2 + r9;
        r1.lineTo(r3, r2);
        r2 = r7.c;
        r3 = r2 / 3;
        r3 = r3 * 2;
        r3 = (float) r3;
        r3 = r3 + r8;
        r2 = (float) r2;
        r2 = r2 + r9;
        r1.lineTo(r3, r2);
        r2 = r7.c;
        r3 = (float) r2;
        r3 = r3 + r8;
        r2 = r2 / 3;
        r2 = (float) r2;
        r2 = r9 - r2;
        r1.lineTo(r3, r2);
        r1.close();
        r10.drawPath(r1, r6);
        r10.drawPath(r1, r0);
        goto L_0x032a;
    L_0x02f8:
        r10 = r23;
        r1 = r7.c;
        r1 = (float) r1;
        r2 = r8 - r1;
        r3 = r9 - r1;
        r4 = r1 + r8;
        r5 = r9 + r1;
        r1 = r23;
        r1.drawRect(r2, r3, r4, r5, r6);
        r1 = r7.c;
        r1 = (float) r1;
        r2 = r8 - r1;
        r3 = r9 - r1;
        r4 = r1 + r8;
        r5 = r9 + r1;
        r1 = r23;
        r6 = r0;
        r1.drawRect(r2, r3, r4, r5, r6);
        goto L_0x032a;
    L_0x031c:
        r10 = r23;
        r1 = r7.c;
        r1 = (float) r1;
        r10.drawCircle(r8, r9, r1, r6);
        r1 = r7.c;
        r1 = (float) r1;
        r10.drawCircle(r8, r9, r1, r0);
    L_0x032a:
        r0 = java.lang.String.valueOf(r14);
        r1 = r7.c;
        r1 = (double) r1;
        r3 = 4608983858650965606; // 0x3ff6666666666666 float:2.720083E23 double:1.4;
        r3 = r3 * r1;
        r3 = (int) r3;
        r3 = (float) r3;
        r8 = r8 - r3;
        r3 = 4615739258092021350; // 0x400e666666666666 float:2.720083E23 double:3.8;
        r1 = r1 * r3;
        r1 = (int) r1;
        r1 = (float) r1;
        r9 = r9 + r1;
        r1 = r7.r;
        r10.drawText(r0, r8, r9, r1);
    L_0x034a:
        r13 = r21 + 1;
        r0 = r10;
        r8 = r15;
        r10 = r17;
        r9 = r20;
        r11 = 0;
        goto L_0x00ad;
    L_0x0355:
        r0 = move-exception;
        monitor-exit(r22);
        throw r0;
    L_0x0358:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.liuzh.deviceinfo.view.GpsSkyView.onDraw(android.graphics.Canvas):void");
    }

    public void onMeasure(int i, int i2) {
        i = Math.min(MeasureSpec.getSize(i), MeasureSpec.getSize(i2));
        setMeasuredDimension(i, i);
        this.a = i;
        this.b = i;
    }

    public synchronized void setGnssStatus(GnssStatus gnssStatus) {
        int i = 0;
        this.G = false;
        this.H = false;
        if (this.D == null) {
            this.D = new int[ISdkLite.REGION_UNSET];
            this.v = new float[ISdkLite.REGION_UNSET];
            this.w = new float[ISdkLite.REGION_UNSET];
            this.x = new float[ISdkLite.REGION_UNSET];
            this.E = new int[ISdkLite.REGION_UNSET];
            this.A = new boolean[ISdkLite.REGION_UNSET];
            this.B = new boolean[ISdkLite.REGION_UNSET];
            this.C = new boolean[ISdkLite.REGION_UNSET];
        }
        int satelliteCount = gnssStatus.getSatelliteCount();
        this.F = 0;
        this.z = 0.0f;
        this.y = 0.0f;
        int i2 = 0;
        float f = 0.0f;
        float f2 = 0.0f;
        while (true) {
            int i3 = this.F;
            if (i3 >= satelliteCount) {
                break;
            }
            this.v[i3] = gnssStatus.getCn0DbHz(i3);
            float[] fArr = this.w;
            int i4 = this.F;
            fArr[i4] = gnssStatus.getElevationDegrees(i4);
            fArr = this.x;
            i4 = this.F;
            fArr[i4] = gnssStatus.getAzimuthDegrees(i4);
            int[] iArr = this.D;
            i4 = this.F;
            iArr[i4] = gnssStatus.getSvid(i4);
            iArr = this.E;
            i4 = this.F;
            iArr[i4] = gnssStatus.getConstellationType(i4);
            boolean[] zArr = this.A;
            i4 = this.F;
            zArr[i4] = gnssStatus.hasEphemerisData(i4);
            zArr = this.B;
            i4 = this.F;
            zArr[i4] = gnssStatus.hasAlmanacData(i4);
            zArr = this.C;
            i4 = this.F;
            zArr[i4] = gnssStatus.usedInFix(i4);
            if (gnssStatus.getCn0DbHz(this.F) != 0.0f) {
                i++;
                f += gnssStatus.getCn0DbHz(this.F);
            }
            if (gnssStatus.usedInFix(this.F)) {
                i2++;
                f2 += gnssStatus.getCn0DbHz(this.F);
            }
            this.F++;
        }
        if (i > 0) {
            this.z = f / ((float) i);
        }
        if (i2 > 0) {
            this.y = f2 / ((float) i2);
        }
        this.u = true;
        invalidate();
    }

    /* JADX WARNING: Missing block: B:36:0x00ef, code skipped:
            if (r11.y > 30.0f) goto L_0x00f1;
     */
    public void setSats(android.location.GpsStatus r12) {
        /*
        r11 = this;
        r0 = 1;
        r11.G = r0;
        r1 = r12.getSatellites();
        r1 = r1.iterator();
        r2 = r11.v;
        if (r2 != 0) goto L_0x0033;
    L_0x000f:
        r12 = r12.getMaxSatellites();
        r2 = new float[r12];
        r11.v = r2;
        r2 = new float[r12];
        r11.w = r2;
        r2 = new float[r12];
        r11.x = r2;
        r2 = new int[r12];
        r11.D = r2;
        r2 = new boolean[r12];
        r11.A = r2;
        r2 = new boolean[r12];
        r11.B = r2;
        r2 = new boolean[r12];
        r11.C = r2;
        r12 = new int[r12];
        r11.E = r12;
    L_0x0033:
        r12 = 0;
        r11.F = r12;
        r2 = 0;
        r11.z = r2;
        r11.y = r2;
        r3 = 0;
        r4 = 0;
        r5 = 0;
        r6 = 0;
    L_0x003f:
        r7 = r1.hasNext();
        if (r7 == 0) goto L_0x00b3;
    L_0x0045:
        r7 = r1.next();
        r7 = (android.location.GpsSatellite) r7;
        r8 = r11.v;
        r9 = r11.F;
        r10 = r7.getSnr();
        r8[r9] = r10;
        r8 = r11.w;
        r9 = r11.F;
        r10 = r7.getElevation();
        r8[r9] = r10;
        r8 = r11.x;
        r9 = r11.F;
        r10 = r7.getAzimuth();
        r8[r9] = r10;
        r8 = r11.D;
        r9 = r11.F;
        r10 = r7.getPrn();
        r8[r9] = r10;
        r8 = r11.A;
        r9 = r11.F;
        r10 = r7.hasEphemeris();
        r8[r9] = r10;
        r8 = r11.B;
        r9 = r11.F;
        r10 = r7.hasAlmanac();
        r8[r9] = r10;
        r8 = r11.C;
        r9 = r11.F;
        r10 = r7.usedInFix();
        r8[r9] = r10;
        r8 = r7.getSnr();
        r8 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));
        if (r8 == 0) goto L_0x00a0;
    L_0x0099:
        r3 = r3 + 1;
        r8 = r7.getSnr();
        r4 = r4 + r8;
    L_0x00a0:
        r8 = r7.usedInFix();
        if (r8 == 0) goto L_0x00ad;
    L_0x00a6:
        r5 = r5 + 1;
        r7 = r7.getSnr();
        r6 = r6 + r7;
    L_0x00ad:
        r7 = r11.F;
        r7 = r7 + r0;
        r11.F = r7;
        goto L_0x003f;
    L_0x00b3:
        if (r3 <= 0) goto L_0x00b9;
    L_0x00b5:
        r1 = (float) r3;
        r4 = r4 / r1;
        r11.z = r4;
    L_0x00b9:
        if (r5 <= 0) goto L_0x00bf;
    L_0x00bb:
        r1 = (float) r5;
        r6 = r6 / r1;
        r11.y = r6;
    L_0x00bf:
        r1 = r11.G;
        if (r1 == 0) goto L_0x00f3;
    L_0x00c3:
        r1 = r11.z;
        r3 = (r1 > r2 ? 1 : (r1 == r2 ? 0 : -1));
        if (r3 == 0) goto L_0x00d1;
    L_0x00c9:
        r1 = java.lang.Float.isNaN(r1);
        if (r1 != 0) goto L_0x00d1;
    L_0x00cf:
        r1 = 1;
        goto L_0x00d2;
    L_0x00d1:
        r1 = 0;
    L_0x00d2:
        r3 = 1106247680; // 0x41f00000 float:30.0 double:5.465589745E-315;
        if (r1 == 0) goto L_0x00dc;
    L_0x00d6:
        r1 = r11.z;
        r1 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1));
        if (r1 > 0) goto L_0x00f1;
    L_0x00dc:
        r1 = r11.y;
        r2 = (r1 > r2 ? 1 : (r1 == r2 ? 0 : -1));
        if (r2 == 0) goto L_0x00e9;
    L_0x00e2:
        r1 = java.lang.Float.isNaN(r1);
        if (r1 != 0) goto L_0x00e9;
    L_0x00e8:
        r12 = 1;
    L_0x00e9:
        if (r12 == 0) goto L_0x00f3;
    L_0x00eb:
        r12 = r11.y;
        r12 = (r12 > r3 ? 1 : (r12 == r3 ? 0 : -1));
        if (r12 <= 0) goto L_0x00f3;
    L_0x00f1:
        r11.H = r0;
    L_0x00f3:
        r11.u = r0;
        r11.invalidate();
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.liuzh.deviceinfo.view.GpsSkyView.setSats(android.location.GpsStatus):void");
    }
}
